package com.hcss.sys.user.controller;

import com.hcss.common.base.BaseClass;
import com.hcss.sys.user.model.vo.HcSysUserVO;
import com.hcss.sys.user.service.HcSysUserService;
import com.hcss.util.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @desc 用户Controller
 * @author maxiaoming
 * @date 2019-09-05 09:41
 * @company 浙江鸿程计算机系统有限公司 
 */
@Slf4j
@RestController
@RequestMapping("/user")
public class HcSysUserController {

    @Autowired
    HcSysUserService hcSysUserService;

    /**
     * 查询用户关联代理人
     * @return
     */
    @RequestMapping("/agents")
    public AjaxResult getUserAgents() {
        HcSysUserVO userVO = hcSysUserService.getUserAgents(BaseClass.getSessionUserid());
        return new AjaxResult(userVO);
    }
}
